1. Field of the Invention
This invention relates to a digital camera (inclusive of a digital still camera, digital movie camera and a portable information device having a camera function) and to a method of controlling the operation thereof.
2. Description of the Related Art
In a case where a picture of a person is taken using a digital camera, often the camera is focused on the face of the person. Focusing is easy if the face is at the center of the shooting zone but the face is not always at the center of the shooting zone. There are occasions, therefore, when it is necessary to detect the image of the face in the image of the subject. For example, there is a technique that involves extracting the portion of the subject image that corresponds to the color of the face from the image, extracting the edge of this portion and then executing matching processing using a template (see the specification of Japanese Patent Application Laid-Open No. 8-63597).
A problem with this technique, however, is that the precision of the processing for extracting the image of the face is not always high.
Further, in some digital cameras it is possible to set a portrait photography mode. If a portrait photography mode has been set, there are occasions where processing specific to portrait photography, such as preliminary light emission, is executed in order to prevent red-eye at the time of flash photography. If the portrait photography mode has been set regardless of the fact that a person does not exist in the subject of photography, an unnatural image may be obtained.
Furthermore, in a digital camera that can be set to a scenery photography mode, it is wasteful to try and detect the image of a face if the scenery photography mode has been set.